<?php

class SocialPlugins  {   

  /**
  * Renders social plugins
  * @param ref_url
  */
   public static function renderDefaultSocialPlugins($ref_url=''){
	    if (!$ref_url) $ref_url = JURI::base();

   ?>
		<!--Plugin Twiter -->
		<div id="plg_twiter">
			<a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php echo $ref_url ?>" data-count="none">Tweet</a>
			<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
		</div>
		<!-- Plugin Facebook -->
		<div id="plg_facebook">
			<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode($ref_url) ?>&amp;width=150&amp;height=21&amp;colorscheme=light&amp;layout=button_count&amp;action=like&amp;show_faces=true&amp;send=false" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:150px; height:21px;" allowTransparency="true"></iframe>
		</div>
		<!-- Plugin Google+ -->
		<div id="plg_google_plus">
			<div class="g-plusone" data-annotation="inline"  data-width="250"></div>

			<script type="text/javascript">
			  (function() {
				var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
				po.src = 'https://apis.google.com/js/plusone.js';
				var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
			  })();
			</script>
		</div>		
		<!-- Logo -->
		<div id="plg_logo">
			<a href="<?php echo JURI::base()?>" target="_blank"><img src="<?php echo JURI::base()?>images/wholesalers-logo.jpg" /></a>
		</div>

	<?php
   }
}
?>